<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
    <link href="https://cdn.bootcss.com/webuploader/0.1.1/webuploader.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/webuploader/0.1.1/webuploader.js"></script>

</head>

<body>

    <div id="uploadimg">
        <div id="fileList" class="uploader-list"></div>
        <div id="imgPicker">选择图片</div>
    </div>

    <script>

        var uploader = WebUploader.create({
            auto: true, // 选完文件后，是否自动上传 
            swf: 'src/js/js/Uploader.swf', // swf文件路径 
            server: 'http://192.168.101.178:8080/User/doUpload', // 文件接收服务端 
            pick: '#imgPicker', // 选择文件的按钮。可选 
            // 只允许选择图片文件。 
            accept: {
                title: 'Images',
                extensions: 'gif,jpg,jpeg,bmp,png',
                mimeTypes: 'image/*'
            }
        });</script>

</body>

</html>